import { request } from "../../utils/request";
import { ElMessage } from "element-plus";
import useUserStore from "../../store/user";
// 新增设备
export const addDeviceData=async (data)=>{
  return request({
    url:'api/lab/admin/v1/device/save',
    method:'post',
    data
  })
}
// 请求设备
export const reqDeviceData=async (current,size)=>{
  return request({
    url:'api/lab/admin/v1/device/query',
    method:'get',
    params:{
      current:current,
      size:size
    }
  })
}
// 请求设备类型
export const reqDeviceTypeData=async ()=>{
  return request({
    url:'api/lab/admin/v1/device/type',
    method:'get',
  })
}

// 查询设备状态
export const reqDeviceStatus=async (mid)=>{
  return request({
    url:'api/lab/admin/v1/device/verify-online',
    method:'get',
    params:{
      mid:mid
    }
  })
}
// 修改设备信息
export const modifyDevice=async (data)=>{
  return request({
    url:'api/lab/admin/v1/device/update',
    method:'put',
    data
  })
}
// 查询业务所属设备组
export const reqOperationDevice=async(operationId)=>{
  return request({
    url:'/api/lab/admin/v1/device/camera',
    method:'get',
    params:{
      operationId:operationId
    }
  })
}